import request from '@/utils/request'
import {
	getToken
} from '@/utils/auth'

/**
 * 查询客户列表
 * @param data
 * @returns {*}
 */
export function paginQuery(data) {
	return request({
		url: '/customer/v1/paginQuery',
		'method': 'post',
		data: data
	})
}

/**
 * 新增客户
 * @param data
 * @returns {*}
 */
export function add(data) {
	return request({
		url: '/customer/v1/add',
		method: 'post',
		data: data
	})
}

/**
 * 编辑客户
 * @param data
 * @returns {*}
 */
export function edit(data) {
	return request({
		url: '/customer/v1/edit',
		method: 'post',
		data: data
	})
}


/**
 * 删除客户
 * @returns {*}
 */
export function deleteById(data) {
	return request({
		url: '/customer/v1/deleteById',
		method: 'get',
		params: data
	})
}

/**
 * 查询单个客户
 * @returns {*}
 */
export function queryById(data) {
	return request({
		url: '/customer/v1/queryById',
		method: 'get',
		params: data
	})
}
/**
 * 根据当前人获取所属部门及上级部门
 * @returns {*}
 */
export function queryUseDeptInfo(data) {
	return request({
		url: '/dept/v1/queryUseDeptInfo',
		method: 'get',
		params: data
	})
}